package com.peas.platform.module.icims.base.approve.adapter.repository.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 审批模版条件
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_approve_condition`")
public class ApproveConditionPo extends BasePo {

    // 审批模版ID
    // 【审批流程表】
    @Comment(value = "审批模版ID")
    @TableField(value = "`approve_id`", jdbcType = JdbcType.BIGINT)
    private Long approveId;

    // 审批条件业务
    // 枚举取值:ApproveBusiness
    @Comment(value = "审批条件业务", enumType = "ApproveBusiness")
    @NotBlank(message = "审批条件业务不能为空")
    @Size(max = 20, message = "审批条件业务不能超过20个字符")
    @TableField(value = "`approve_condition_business`", jdbcType = JdbcType.VARCHAR)
    private String approveConditionBusiness;

    // 审批条件字段
    // 枚举取值:ApproveBusinessField
    @Comment(value = "审批条件字段", enumType = "ApproveBusinessField")
    @Size(max = 100, message = "审批条件字段不能超过100个字符")
    @TableField(value = "`approve_condition_field`", jdbcType = JdbcType.VARCHAR)
    private String approveConditionField;

    // 审批条件描述
    @Comment(value = "审批条件描述")
    @Size(max = 100, message = "审批条件描述不能超过100个字符")
    @TableField(value = "`approve_condition_label`", jdbcType = JdbcType.VARCHAR)
    private String approveConditionLabel;

    // 审批条件比较符
    @Comment(value = "审批条件比较符")
    @Size(max = 20, message = "审批条件比较符不能超过20个字符")
    @TableField(value = "`approve_condition_oper`", jdbcType = JdbcType.VARCHAR)
    private String approveConditionOper;

    // 审批条件值
    // 多个值用半角逗号
    @Comment(value = "审批条件值")
    @Size(max = 500, message = "审批条件值不能超过500个字符")
    @TableField(value = "`approve_condition_values`", jdbcType = JdbcType.VARCHAR)
    private String approveConditionValues;

}
